﻿
namespace ShpMerger
{
    internal class OneInfoHeader
    {
        public int InfoNumber { set; get; }
        public int InfoLength { private set; get; }

        public OneInfoHeader()
        {
            InfoLength = 0;
            InfoNumber = 0;
        }

        public void ReadInfoHeader(ExtendBinaryReader binaryReader)
        {
            InfoNumber = binaryReader.ReadUsingBigEndian();
            InfoLength = binaryReader.ReadUsingBigEndian();
        }

        public void WriteInfoHeader(ExtendBinaryWriter binaryWriter)
        {
            binaryWriter.WriteUsingBigEndian(InfoNumber);
            binaryWriter.WriteUsingBigEndian(InfoLength);
        }
    }
}
